package cn.btks.resultintegration.rule.service.impl;

import cn.btks.resultintegration.rule.pojo.Dcbgzgrwqd;
import cn.btks.resultintegration.rule.repository.DcbgzgrwqdRepository;
import cn.btks.resultintegration.rule.service.DcbgzgrwqdService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author lijun
 * @CompileUnit 测绘地理信息分院研发中心
 * @Date 2023/9/22 14:38
 */
@Service
public class DcbgzgrwqdServiceImpl implements DcbgzgrwqdService {

    @Autowired
    DcbgzgrwqdRepository repository;

    @Override
    public List<Dcbgzgrwqd> findAllByCity(String city) {
        List<Dcbgzgrwqd> list = repository.findAllBySs(city);
        return CollectionUtils.isNotEmpty(list) ? list : null;
    }

    @Override
    public List<Dcbgzgrwqd> findAll() {
        return repository.findAll();
    }
}
